package com.navi.loaddata.core.oracleEntity;

import com.navi.loaddata.core.oracleEntity.array.EtlArrayGlassSummaryV;
import com.navi.loaddata.core.oracleEntity.cell1.EtlCellComponentSummaryV;
import com.navi.loaddata.core.oracleEntity.cell2.EtlCell2ChipSummaryV;
import com.navi.loaddata.core.oracleEntity.cf.EtlCfGlassSummaryV;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * Created by Jay on 2018/3/27.
 */

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface EtlGlassSummaryVMapper {

    EtlGlassSummaryVMapper INSTANCE = Mappers.getMapper(EtlGlassSummaryVMapper.class);

    EtlArrayGlassSummaryV etlGlassToArray(EtlGlassSummaryV glassVMapper);
    List<EtlArrayGlassSummaryV> etlGlassToArray(List<EtlGlassSummaryV> list);


    EtlCfGlassSummaryV etlGlassToCf(EtlGlassSummaryV glassVMapper);
    List<EtlCfGlassSummaryV> etlGlassToCf(List<EtlGlassSummaryV> list);

    @Mapping(target = "componentId",source = "glassId")//属性名不一致映射
    @Mapping(target = "componentEndTime",source = "glassEndTime")//属性名不一致映射
    EtlCellComponentSummaryV etlGlassToCell1(EtlGlassSummaryV glassVMapper);
    List<EtlCellComponentSummaryV> etlGlassToCell1(List<EtlGlassSummaryV> list);


    @Mapping(target = "chipId", source = "glassId")//属性名不一致映射
    @Mapping(target = "chipEndTime", source = "glassEndTime")//属性名不一致映射
    EtlCell2ChipSummaryV etlGlassToCell2(EtlGlassSummaryV glassVMapper);
    List<EtlCell2ChipSummaryV> etlGlassToCell2(List<EtlGlassSummaryV> list);

}
